.PHONY: build
build:
	gcc -o app app.c
	docker build -t liushiju/app:io-direct -f Dockerfile .
	gcc -o app-cached app-cached.c
	docker build -t liushiju/app:io-cached -f Dockerfile-cached .

.PHONY: run
run:
	docker run --privileged --name=app -itd liushiju/app:io-direct

.PHONY: run-fix
run-fix:
	docker run --privileged --name=app-fix -itd liushiju/app:io-cached

.PHONY: clean
clean:
	rm -f app
	docker rm -f app || echo "Container app already deleted."

.PHONY: clean-fix
clean-fix:
	rm -f app-fix
	docker rm -f app-fix || echo "Container app-fix already deleted."
